package com.usian.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.usian.pojo.User;
import com.usian.pojo.UserVo;
import com.usian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("findPage")
    public Page findPage(@RequestBody UserVo userVo){
        return userService.findPage(userVo);
    }
    @RequestMapping("findAll")
    public List<User> findAll(){
        return userService.findAll();
    }
}
